import {request} from "@@/plugin-request/request";

import {RequestSuccessLog, RequestSuccessLogParams} from "@/pages/system/tool/requestLog/interfaces";
import {HttpResult} from "@/services/typings";
import {DataStatisticProps} from "@/pages/system/tool/requestLog/list/Stateless/components/DataStatistic/interfaces";


export const adminSuccessLogList = async (requestSuccessLogParams: RequestSuccessLogParams) => {
  return request<{
    data: {
      content: RequestSuccessLog[],
      totalElements: number,
    }
    success: boolean
  }>('/api/request/log/admin/success', {
    method: 'POST',
    data: requestSuccessLogParams
  });
}

export const getStatistics = async () => {
  return request<HttpResult<DataStatisticProps>>(
    "/api/request/log/statistics", {
      method: "POST"
    }
  )
}


